package com.example.springboot_study.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author : liqun
 * @createTime : 2021/9/3 14:31
 */
@ApiModel(description = "结果处理类", value = "ErrorInfo")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ErrorInfo<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    public static final Integer OK = 0;
    public static final Integer ERROR = 100;

    @ApiModelProperty(name = "code", value = "状态码", required = false)
    private Integer code;
    @ApiModelProperty(name = "message", value = "结果信息", required = false)
    private String message;
    @ApiModelProperty(name = "url", value = "URL", required = false)
    private String url;
    @ApiModelProperty(name = "data", value = "结果值", required = false)
    private T data;

}
